package com.small.site.service.impl;

import com.small.site.dao.SysUserDao;
import com.small.site.ibase.impl.BaseServiceImpl;
import com.small.site.base.IUserService;
import com.small.site.pojo.SysUser;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author xiaochi
 * @date 2021/12/2 22:06
 * @desc UserServiceImpl
 * 注意在使用 dubbo 时，如果需要事务，则需要在 @Service上加上 interfaceClass 属性，指定接口类型，
 * 如果不指定，这个接口被多个代理，不知道找那个接口，导致服务发布不成功
 */
@DubboService(interfaceClass = IUserService.class)
public class UserServiceImpl extends BaseServiceImpl<SysUser> implements IUserService {

    @Autowired
    private SysUserDao sysUserDao;

    /**
     * 批量/删除用户接口
     * @param sysUser
     * @param list
     * @return
     */
    @Override
    public int deletedUsers(SysUser sysUser, List<String> list) {
        return sysUserDao.deletedUsers(sysUser,list);
    }
}